<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <h1> undefined 和null 与undefined进行==，都为true</h1>
</body>
<script>
  let a = undefined;
  console.log('1', a == undefined);
  console.log('1===', a === undefined);
  let b = null;
  console.log('2', b == undefined);
  console.log('2===', b === undefined);
  console.log('3', typeof a == 'undefined')
  console.log('4', typeof b == 'undefined')
</script>

</html>